<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-comment">-- |</span><span>
</span><span id="line-2"></span><span class="hs-comment">-- Module      : Data.Text.Internal.Encoding.Utf32</span><span>
</span><span id="line-3"></span><span class="hs-comment">-- Copyright   : (c) 2008, 2009 Tom Harper,</span><span>
</span><span id="line-4"></span><span class="hs-comment">--               (c) 2009, 2010 Bryan O'Sullivan,</span><span>
</span><span id="line-5"></span><span class="hs-comment">--               (c) 2009 Duncan Coutts</span><span>
</span><span id="line-6"></span><span class="hs-comment">--</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- License     : BSD-style</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- Maintainer  : bos@serpentine.com</span><span>
</span><span id="line-9"></span><span class="hs-comment">-- Stability   : experimental</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- Portability : portable</span><span>
</span><span id="line-11"></span><span class="hs-comment">--</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- /Warning/: this is an internal module, and does not have a stable</span><span>
</span><span id="line-13"></span><span class="hs-comment">-- API or name. Functions in this module may not check or enforce</span><span>
</span><span id="line-14"></span><span class="hs-comment">-- preconditions expected by public modules. Use at your own risk!</span><span>
</span><span id="line-15"></span><span class="hs-comment">--</span><span>
</span><span id="line-16"></span><span class="hs-comment">-- Basic UTF-32 validation.</span><span>
</span><span id="line-17"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Data.Text.Internal.Encoding.Utf32</span><span>
</span><span id="line-18"></span><span>    </span><span class="hs-special">(</span><span>
</span><span id="line-19"></span><span>      </span><span class="annot"><a href="Data.Text.Internal.Encoding.Utf32.html#validate"><span class="hs-identifier">validate</span></a></span><span>
</span><span id="line-20"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-21"></span><span>
</span><span id="line-22"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Word.html#"><span class="hs-identifier">Data.Word</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word32"><span class="hs-identifier">Word32</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-23"></span><span>
</span><span id="line-24"></span><span class="annot"><a href="Data.Text.Internal.Encoding.Utf32.html#validate"><span class="hs-identifier hs-type">validate</span></a></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word32"><span class="hs-identifier hs-type">Word32</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-25"></span><span id="validate"><span class="annot"><span class="annottext">validate :: Word32 -&gt; Bool
</span><a href="Data.Text.Internal.Encoding.Utf32.html#validate"><span class="hs-identifier hs-var hs-var">validate</span></a></span></span><span> </span><span id="local-6989586621679104277"><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679104277"><span class="hs-identifier hs-var">x1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679104277"><span class="hs-identifier hs-var">x1</span></a></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word32 -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><span class="hs-number">0xD800</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%7C%7C"><span class="hs-operator hs-var">||</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679104277"><span class="hs-identifier hs-var">x1</span></a></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word32 -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E"><span class="hs-operator hs-var">&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><span class="hs-number">0xDFFF</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679104277"><span class="hs-identifier hs-var">x1</span></a></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word32 -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><span class="hs-number">0x10FFFF</span></span><span class="hs-special">)</span><span>
</span><span id="line-26"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Text.Internal.Encoding.Utf32.html#validate"><span class="hs-pragma hs-type">validate</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-27"></span></pre></body></html>